#!/usr/bin/python
# -*- coding: utf-8 -*-

#创建地瓜类
class SweetPotato(object):
    def __init__(self):
        self.time = 0
        self.status = '生的'
        self.tiaoliaobiao = []


    def cook(self, time):
        self.time += time
        if int(self.time) < 3:
            self.status = '生的'
        elif 3<= int(self.time) <5:
            self.status = '半生不熟'
        elif 5 <= int(self.time) < 8:
            self.status = '熟了'
        else:
            self.status = '糊了'

    def add_tiaoliao(self):
        a = input('请输入想添加的调料:')
        self.tiaoliaobiao.append(a)

    def __str__(self):
        return f'地瓜现在烤了{self.time}分钟,现在地瓜{self.status},地瓜上添加的调料有{self.tiaoliaobiao}'


if __name__ == '__main__':
    result = SweetPotato()
    result.cook(5)
    print(result)




























